
class ProductGQL {

  // 查询广告列表的GraphQL查询
  static const String fetchProductAds = r'''
query ProductAd {
  productAd {
    advertisingList {
      id
      productId
      coverAddr
      createTime
      updateTime
    }
  }
}
  ''';

  static const String fetchProductList = r'''
query MyQuery($limit: Int = 10, $cursor: String ) {
  product {
    productList(limit: $limit, cursor: $cursor) {
      hasNext
      nextCursor
      products {
        coverAddr
        id
        title
        price
        rate
      }
    }
  }
}
  ''';

static const String fetchProductDetail = r'''
query MyQuery($id: String) {
  product {
    productById(id: $id) {
      coverAddr
      createTime
      description
      detailAddr
      id
      price
      rate
      status
      stockpile
      stockpileFrozen
      title
      updateTime
      specifications {
        createTime
        id
        item
        productId
        updateTime
        value
      }
    }
  }
}
  ''';

static const String fetchQueryProductList = r'''
query MyQuery2(
  $keyword: String
  $limit: Int
  $cursor: String
) {
  product {
    queryProductList(keyword: $keyword, limit: $limit, cursor: $cursor) {
      hasNext
      nextCursor
      products {
        coverAddr
        createTime
        detailAddr
        description
        id
        rate
        price
        specifications {
          createTime
          item
          id
          productId
          value
          updateTime
        }
        stockpileFrozen
        title
        status
        stockpile
        updateTime
      }
    }
  }
}
''';

}